const { defineConfig } = require('@vue/cli-service')

module.exports = defineConfig({
  publicPath: './',
  transpileDependencies: true,

  configureWebpack: {
    resolve: {
      alias: {
        crypto: false,
        stream: false,
        assert: false,
        http: false,
        https: false,
      },
    },
  },

  devServer: {
    proxy: {
      '/proxy': {
        target: process.env.VUE_APP_API_URL,
        ws: true,
        changeOrigin: true,
        pathRewrite: {
          '^/proxy': '',
        },
      },
    },
  },
})
